/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package korekosystem.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author santiago
 */
@Entity
@Table(name = "sms")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sms.findAll", query = "SELECT s FROM Sms s"),
    @NamedQuery(name = "Sms.findById", query = "SELECT s FROM Sms s WHERE s.id = :id"),
    @NamedQuery(name = "Sms.findByCuerpo", query = "SELECT s FROM Sms s WHERE s.cuerpo = :cuerpo"),
    @NamedQuery(name = "Sms.findByFecha", query = "SELECT s FROM Sms s WHERE s.fecha = :fecha"),
    @NamedQuery(name = "Sms.findByEnviado", query = "SELECT s FROM Sms s WHERE s.enviado = :enviado"),
    @NamedQuery(name = "Sms.findByNumero", query = "SELECT s FROM Sms s WHERE s.numero = :numero")})
public class Sms implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "cuerpo")
    private String cuerpo;
    @Column(name = "fecha")
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Basic(optional = false)
    @Column(name = "enviado")
    private boolean enviado;
    @Basic(optional = false)
    @Column(name = "numero")
    private String numero;

    public Sms() {
    }

    public Sms(Integer id) {
        this.id = id;
    }

    public Sms(Integer id, String cuerpo, boolean enviado, String numero) {
        this.id = id;
        this.cuerpo = cuerpo;
        this.enviado = enviado;
        this.numero = numero;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCuerpo() {
        return cuerpo;
    }

    public void setCuerpo(String cuerpo) {
        this.cuerpo = cuerpo;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public boolean getEnviado() {
        return enviado;
    }

    public void setEnviado(boolean enviado) {
        this.enviado = enviado;
    }

    public String getNumero() {
        return numero;
    }

    public void setNumero(String numero) {
        this.numero = numero;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sms)) {
            return false;
        }
        Sms other = (Sms) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "korekosystem.modelo.Sms[ id=" + id + " ]";
    }
    
}
